package com.gitee.chili.leisure;

import lombok.Getter;

/**
 * ResponseCode
 *
 * @author week solider
 * @version v1.0
 * @since 2019/12/9
 */
public enum ResponseCode {


    // ===================================== 特殊类提示信息 ====================================
    SERVER_BUSY(429, "服务器繁忙"),
    UNAUTHORIZED(403, "权限不足"),
    AUTHORIZED_EXPIRE(401, "验证信息已过期，请重新登录"),
    SING_FAIL(501, "签名错误"),


    // ===================================== 游戏类提醒 ====================================
    SAT_DOWN(2, "您已在房间入座，请先退出原房间"),
    NOT_FOUND_ROOM(3, "房间不存在"),
    CACHE_MISS(4, "缓存丢失"),
    ROOM_FULL(5, "房间已满员"),
    DISCONNECT(6, "重新连接"),
    ROOM_DISSOLVE(7, "房间已解散"),
    LACK_QUALIFICATION(8, "不满足进场要求"),
    ROOM_NOT_AVAILABLE(9, "房间不可用"),
    NOT_FOUND_CARDS(10, "未在手牌中找到出牌信息"),
    NOT_HOMEOWNER(500, "房主才可解散房间"),


    // ===================================== 通用类提示信息 ====================================
    SUCCESS(200, "SUCCESS"),
    FAIL(500, "请求失败"),
    TIMEOUT(408, "请求超时"),
    ;

    @Getter
    private final Integer code;
    @Getter
    private final String value;

    ResponseCode(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

}
